//
//  BaseGrayView.m
//  AutoHome
//
//  Created by wqh on 15-5-12.
//  Copyright (c) 2015年 Wqh. All rights reserved.
//

#import "BaseGrayView.h"

@implementation BaseGrayView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor customGrayColor];
        self.alpha = 0;
    }
    return self;
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    [UIView animateWithDuration:0.5 animations:^{
        if (self.myBlock) {
            self.myBlock();
        }
        self.alpha = 0;
    } completion:^(BOOL finished) {
        
    }];
    
}
@end
